package pojo;

import javax.print.Doc;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

import DataAccess.BaseDA;

public class TinNhanPOJO  {
	private int id;
	private int idNguoiGui;
	private int idNguoiNhan;
	private String noiDung;
	private int tinhTrang;
	private long thoiGian;
	public int getiD() {
		return id;
	}
	public void setiD(int iD) {
		this.id = iD;
	}
	public int getIdNguoiGui() {
		return idNguoiGui;
	}
	public void setIdNguoiGui(int iDNguoiGui) {
		this.idNguoiGui = iDNguoiGui;
	}
	public int getIdNguoiNhan() {
		return idNguoiNhan;
	}
	public void setIdNguoiNhan(int idNguoiNhan) {
		this.idNguoiNhan = idNguoiNhan;
	}
	public String getNoiDung() {
		return noiDung;
	}
	public void setNoiDung(String noiDung) {
		this.noiDung = noiDung;
	}
	public int getTinhTrang() {
		return tinhTrang;
	}
	public void setTinhTrang(int tinhTrang) {
		this.tinhTrang = tinhTrang;
	}
	public long getThoiGian() {
		return thoiGian;
	}
	public void setThoiGian(long thoiGian) {
		this.thoiGian = thoiGian;
	}
	
	public Element createXMLElement(Document doc){
		Element e=doc.createElement("TinNhan");
		e.setAttribute("ID", id+"");
		e.setAttribute("IDNguoiGui", idNguoiGui+"");
		e.setAttribute("IDNguoiNhan", idNguoiNhan+"");
		e.setAttribute("NoiDung", noiDung);
		e.setAttribute("TinhTrang", tinhTrang+"");
		e.setAttribute("ThoiGian", thoiGian+"");
		return e;
	}
	
}
